/**
 Copyright will be fixed soon.
 Author: Hiroshi Ota.
 $Date: $
 $Revision: $
*/

#include "Lamp.h"

#ifndef _BRICKOS_

Lamp::Lamp(enum Port port, ISimulatorControl* sc)
: simCon(sc)
{
}

Lamp::~Lamp(void)
{
}

const void Lamp::on() const
{
	if (simCon!=0){
		simCon->setLightStatus(myPort, true);
	}
}

const void Lamp::off() const
{
	if (simCon!=0){
		simCon->setLightStatus(myPort, false);
	}
}

const void Lamp::brightness(const unsigned char level) const
{
	if (simCon!=0){
		simCon->setLightBrightness(myPort, level);
	}
}

#endif  // _BRICKOS_
